import router from 'vue-router'
import Vue from 'vue'
const order_info = () => import('../components/pages/order/order.vue')
const store = () => import('../components/pages/store/store.vue')
const buy = () => import('../components/pages/store/buy.vue')
const employee = () => import('../components/pages/employee/employee.vue')
const editEmployee = () => import('../components/pages/employee/editEmployee.vue')
const addOrder = () => import('../components/pages/order/addorder.vue')
const customer = () => import('../components/pages/customer/customer.vue')
const editCustomer = () => import('../components/pages/customer/editCustomer.vue')
const supplier = () => import('../components/pages/supplier/supplier.vue')
const editSupplier = () => import('../components/pages/supplier/editSupplier.vue')
const product = () => import('../components/pages/product/product.vue')
const editProduct = () => import('../components/pages/product/editProduct.vue')
const addCustomer = () => import('../components/pages/customer/addCustomer.vue')
const addEmployee = () => import('../components/pages/employee/addEmployee.vue')
const addProduct = () => import('../components/pages/product/addProduct.vue')
const addSupplier =()=>import('../components/pages/supplier/addSupplier.vue')
Vue.use(router)
const Routes = [
    {
        path: '/',
        redirect: '/order'
    }, {
        path: '/order',
        component: order_info
    }, {
        path: '/store',
        component: store
    }, {
        path: '/buy',
        component: buy
    }, {
        path: '/employee',
        component: employee,
      
    },
    {
        path: '/editEmployee',
        component: editEmployee
    }, {
        path: '/addOrder',
        component:addOrder
    }, {
        path: '/customer',
        component:customer
    }, {
        path: '/editCustomer',
        component:editCustomer
    }, {
        path: '/supplier',
        component:supplier
    }, {
        path: '/editSupplier',
        component:editSupplier
    }, {
        path: '/product',
        component:product
    }, {
        path: '/editProduct',
        component:editProduct
    }, {
        path: '/addCustomer',
        component:addCustomer
    }, {
        path: '/addEmployee',
        component:addEmployee
    }, {
        path: '/addProduct',
        component:addProduct
    }, {
        path: '/addSupplier',
        component:addSupplier
    }
]
const r = new router({

    routes: Routes,
    mode: 'history'
})
export default r